using System;
using System.Collections.Generic;
using System.Linq;
using TestMonkey.Models;
using TestMonkey.TestRunners;
using RazorEngine.Templating;

namespace TestMonkey.Templates
{
    public abstract class CodeTemplateBase : TemplateBase<ModelRoot>
    {

        public TestRunner Assert
        {
            get { return Model.TestRunner; }
        }

        public TestRunner TestRunner
        {
            get { return Model.TestRunner; }
        }

        public TestModel Test
        {
            get { return Model.Test; }
        }

        public ClassModel Class
        {
            get { return Model.Class; }
        }

        public CodeString TestAttribute
        {
            get { return Model.TestRunner.TestAttribute; }
        }

        public CodeString ManualTestAttribute
        {
            get { return Model.TestRunner.ManualTestAttribute; }
        }

        public CodeString Tag(string tagName)
        {
            if (Model.Setup.UseTags)
                return TestRunner.TagAttributes(tagName);

            return "";
        }
    }
}
